/** DefaultEventData
 * [DefaultEventData description]
 * @type {Object}
 * 默认事件参数
 */
export const DefaultEventData = {
  label: '默认',
  type: 'FORWARD',
  icon: 'jy-icon-post',
  prefix: '/2/page/button?request_url=',
};



/** 事件定义参数
 * [事件 description]
 * @type {Object}
 */
/*  //
  const FORWARD = {
    label: '转发博文',
    type: 'FORWARD',
    icon: 'jy-icon-post',
    prefix: '/2/page/button?request_url=',
    // suffix: '',
    // encode: false,
    request: {
      url: 'https://apib.hd.xxx.com/v1/fcardlist/forward',
      params: {
        site_id: '',
        mid: '',
        text: '',
      },
      encode: true,
    },

    disabled: true,
  };
*/

const VOTE = {
  label: '投票',
  type: 'VOTE',
  eid: '1001',
  icon: 'jy-icon-post',
  prefix: '/2/page/button?request_url=',
  // suffix: '',
  // encode: false,
  request: {
    url: 'https://apib.hd.xxx.com/v1/fcardlist/vote',
    params: {
      site_id: '',
      vote_id: '',
      text: '',
      // event_order: '1',
      pic_ids: '',
    },
    encode: true,
  },
  // appliedRange: [ 'CARD_2001' ],
  event_data: {
    params: {
      day_limit: 0,
      elements: [
        // {
        //   base: 0,
        //   total: 0,
        //   num: 0,
        //   progress: 0,
        //   pic_ids: [],
        // },
      ],
      // pic_ids: [],
    },
  },

  // disabled: true,
};

const WB_REPOST = {
  label: '转发博文',
  type: 'WB_REPOST',
  eid: 'CARD_E0001',
  icon: 'jy-icon-post',
  prefix: '/2/page/button?request_url=',
  // suffix: '',
  // encode: false,
  request: {
    url: 'https://apib.hd.xxx.com/v1/fcardlist/wb_repost',
    params: {
      site_id: '',
      mid: '',
      text: '',
      event_order: '1',
    },
    encode: true,
  },
  event_data: {
    params: {
      elements: [],
    },
  },
};

const WB_FOLLOW = {
  label: '关注',
  type: 'WB_FOLLOW',
  eid: 'CARD_E0002',
  icon: 'jy-icon-post',
  prefix: '/2/page/button?request_url=',
  // suffix: '',
  // encode: false,
  request: {
    url: 'https://apib.hd.xxx.com/v1/fcardlist/wb_follow',
    params: {
      site_id: '',
      follow_uids: '',
    },
    encode: true,
  },
};

const WB_PRAISE = {
  label: '点赞',
  type: 'WB_PRAISE',
  eid: 'CARD_E0003',
  icon: 'jy-icon-post',
  prefix: '/2/page/button?request_url=',
  // suffix: '',
  // encode: false,
  request: {
    url: 'https://apib.hd.xxx.com/v1/fcardlist/wb_praise',
    params: {
      site_id: '',
      mid: '',
    },
    encode: true,
  },
};

const WB_PUSH = {
  label: '发博',
  type: 'WB_PUSH',
  eid: 'CARD_E0004',
  icon: 'jy-icon-post',
  prefix: '/2/page/button?request_url=',
  // suffix: '',
  // encode: false,
  request: {
    url: 'https://apib.hd.xxx.com/v1/fcardlist/wb_push',
    params: {
      site_id: '',
      text: '',
      event_order: '1',
      pic_ids: '',
    },
    encode: true,
  },
  event_data: {
    params: {
      elements: [
        // {
        //   pic_ids: [],
        // },
      ],
      // bis_pic_random: false,  // 预留随机图片
      // num_pic_random: 0,  // 预留随机图片
      // pic_ids: [],
    },
  },
};

const SIGN = {
  label: '签到',
  type: 'SIGN',
  eid: '1001',
  icon: 'jy-icon-post',
  prefix: '/2/page/button?request_url=',
  request: {
    url: 'https://apib.hd.xxx.com/v1/fcardlist/sign',  // https://apib.hd.xxx.com/v1/fcardlist/wb_push
    params: {
      event_type: 'SIGN',
      site_id: '',
      // vote_id: '',
      event_order: '1',
      h5_com_id: '',  // dba36830-4c0b-48b6-9ce4-70f43378a663
      h5_site_id: '',  // 1372
      text: '',
      pic_ids: '',
    },
    encode: true,
  },
  event_data: {
    params: {
      elements: [
        // {
        //   bIsReplaceButton: true,
        //   button: {},
        //   h5_com_id: dba36830-4c0b-48b6-9ce4-70f43378a663,
        //   h5_site_id: 1372,
        //   pic_ids: [],
        // },
      ],
    },
  },
};

const UNLOCK = {
  label: '解锁',
  type: 'UNLOCK',
  eid: '1001',
  icon: 'jy-icon-post',
  prefix: '/2/page/button?request_url=',
  request: {
    url: 'https://apib.hd.xxx.com/v1/fcardlist/unlock',
    params: {
      event_type: 'UNLOCK',
      site_id: '',
      vote_id: '',
      text: '',
      // event_order: '1',
      pic_ids: '',
    },
    encode: true,
  },
  event_data: {
    params: {
      event_type: 'UNLOCK',
      day_limit: 0,
      elements: [
        // {
        //   base: 0,
        //   total: 0,
        //   num: 0,
        //   progress: 0,
        //   pic_ids: [],
        // },
        // button: {},
      ],
      // pic_ids: [],
    },
  },
};



/** CardEventsPreshowList
 * [CardEventsPreshowList description]
 * @type {Array}
 * 预选事件
 */
export const CardEventsPreshowList = [
  'VOTE',
  'WB_REPOST',
  'WB_FOLLOW',
  'WB_PRAISE',
  // 'SIGN',
];

/** CardEventsJson
 * [CardEventsJson description]
 * @type {Object}
 * 所有事件集合
 */
export const CardEventsJson = {
  // FORWARD,
  VOTE,
  WB_PUSH,
  WB_REPOST,
  WB_FOLLOW,
  WB_PRAISE,
  SIGN,
  UNLOCK,
};
